import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './app'
import {BrowserRouter} from 'react-router-dom'
// document.body.style.background = 'red'
import {AliveScope} from 'react-activation'
// let vnode = <div> 我是脚手架</div>
let btn = document.querySelectorAll('button')

// ReactDOM.render(<App />,document.querySelector('#root'))


// btn[0].onclick = function(){
//     ReactDOM.render(<App />,document.querySelector('#root'))
// }

// btn[1].onclick = function(){
//     // 删除事件
//     ReactDOM.unmountComponentAtNode(document.querySelector('#root'));
// }

const root = ReactDOM.createRoot(document.querySelector('#root'))
root.render(<BrowserRouter><AliveScope><App></App></AliveScope></BrowserRouter>)